#define _CRT_SECURE_NO_WARNINGS 1

#include <stdio.h>
#include <string.h>
char* my_strtok(char* p1, const char* p2)
{
	static char* ret = NULL;
	if (p1 != NULL)
		ret = p1;
	if (p1 == NULL)
		ret++;
	if (*ret == '\0')
		return NULL;
	char* cur = ret;
	while (*ret)
	{
		while (*p2)
		{
			if (*ret == *p2)
				*ret = '\0';
			if (*ret == '\0')
				break;
			else
				p2++;
		}
		if (*ret == '\0')
			break;
	}
	return cur;
}
int main()
{
	char arr1[] = "3173893916@qq.com";
	char arr2[] = "@.";
	char* str = NULL;
	for (str = strtok(arr1, arr2); str != NULL; str = strtok(NULL, arr2))
	{
		printf("%s\n", str);
	}

	return 0;
}